<h2 class="headline"><%= _("<b>Foreman</b> audit summary").html_safe %></h2>
<ul class="none">
  <% if @audits.size > 0 %>
    <%= n_('Displaying %{num_audits} of %{total_audits} audit',
           'Displaying %{num_audits} of %{total_audits} audits', @count) % {:num_audits => @limit, :total_audits => @count} %>
    <% @audits.each do |audit| %>
      <li class="item">
        <% login = audit.user_login
           user_search_param = login ? "user = #{login}" : %Q{username = "#{audit.username}"} %>
        <b>
          <%= link_to(audit.username, audits_url(:search => user_search_param)) %>
          <span style="color: #cccccc"><%= audit_remote_address audit %></span>
          <%= audit_action_name audit%> <%= audited_type audit %>:
          <%= link_to(audit_title(audit), audits_url(search: "id = #{audit.id}"), {:style => 'color: #2a6496'}) %>
        </b>
        <ul style="list-style-type: none;">
          <% details(audit, audits_url(search: "id = #{audit.id}")).each do |detail| -%>
            <li>
              <%= detail %>
            </li>
          <% end -%>
        </ul>
      </li>
    <% end %>
  <% else %>
    <li>
      <b><%= _('No audit changes for this period') %></b>
    </li>
  <% end %>
</ul>
<p>
  <%= link_to(_('Full audits list'), audits_url(:search => @query)) %>
</p>
